package practices;

import java.util.concurrent.ForkJoinPool;

/**
 * @Date 2025/4/21 16:39
 * @Created by weimeiling
 */
public class ForkJoinPoolStuExample {
    public static void main(String[] args) {

    }
}

class CreateForkJoinPool {
    private static final int MAX_THREADS = Runtime.getRuntime().availableProcessors();
    private static final ForkJoinPool forkJoinPool = new ForkJoinPool(MAX_THREADS);

    public static ForkJoinPool getForkJoinPool() {
        return forkJoinPool;
    }

    public static void shutdownForkJoinPool() {
        forkJoinPool.shutdown();
    }

}

